import request from "@/utils/request";

// 查询模板列表
export function listDiagnosis(query) {
  return request({
    url: "/system/diagnosis/page",
    method: "get",
    params: query,
  });
}

// 查询模板详细
export function getDiagnosis(deptId) {
  return request({
    url: "/system/diagnosis/" + deptId,
    method: "get",
  });
}

// 新增模板
export function addDiagnosis(data) {
  return request({
    url: "/system/diagnosis",
    method: "post",
    data: data,
  });
}

// 修改模板
export function updateDiagnosis(data) {
  return request({
    url: "/system/diagnosis",
    method: "put",
    data: data,
  });
}

// 删除模板
export function delDiagnosis(noticedeptId) {
  return request({
    url: "/system/diagnosis/" + noticedeptId,
    method: "delete",
  });
}

//现场诊断相关接⼝
// 保存现场测评报告接⼝（组⻓选择原因、建议库。并⾃定义修改后提交）
export function diagnosisDomain(data) {
  return request({
    url: "/system/diagnosis/domain",
    method: "put",
    data: data,
  });
}

//导出现场诊断报告接⼝
export function getDiagnosisWord(deptId) {
  return request({
    url: "/system/diagnosis/record3/word/" + deptId,
    method: "get",
    responseType: "blob",
  });
}
